{% extends "../../index.html" %}

{%block page-title %}Paste code{% endblock %}
{%block h1 %}Paste code{% endblock %}
{%block page-content %}

{% if u_parent %}
<p class="info">You are editing a copy of an older paste: <a href="{{ u_parent }}">{{ u_parent }}</a>.</p>
{% endif %}

<form method="post" action="/">
    {% if pasty_error %}
        <p class="error">{{ pasty_error }}</p>
    {% endif %}
    <table>
        <tr>
            <td>
                <ul>
                    <li>
                        <label for="pasty_code">Your code</label>
                        {% if pasty_code_error %}
                        <p class="warning">{{ pasty_code_error }}</p>
                        {% endif %}
                        <p class="input"><textarea name="pasty_code" id="pasty_code" rows="20" cols="50">{{ pasty_code }}</textarea></p>
                    </li>
                </ul>
            </td>
            <td style="width:300px;">
                <ul>
                    <li>
                        <label for="pasty_title">Title</label> <small>(optional)</small>
                        <p class="input"><input type="text" name="pasty_title" id="pasty_title" value="{{ pasty_title }}"/></p>
                    </li>
                    <li>
                        <label for="pasty_tags">Tags</label> <small>(optional)</small>: 
                        <span class="explanation">A coma separated list of tags.</span>
                        <div class="input">
                            <input type="text" name="pasty_tags" value="{{ pasty_tags }}"/>
                        </div>
                    </li>
                    <li>
                        <label for="pasty_user_name">User name</label> <small>(optional)</small>
                        <p class="input">
                            <input type="text" name="pasty_user_name" id="pasty_user_name" value="{{ pasty_user_name }}"/>
                        </p>
                    </li>
                </ul>
            </td>
        </tr>
    </table>

    <ul>
        <li><input type="submit" value="Paste!" /></li>
    </ul>

    {% if pasty_token %}
    <p><input type="hidden" name="pasty_token" value="{{ pasty_token }}" /></p>
    {% endif %}

    {% if pasty_parent_slug %}
    <p><input type="hidden" name="pasty_parent_slug" value="{{ pasty_parent_slug }}" /></p>
    {% endif %}
</form>

{% endblock %}
